<?php
@$zid=$_REQUEST['zid'];


?>
<html><head>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	
	<script src="js/jquery-1.11.3.js"></script>
	<script src="js/bootstrap.js"></script>
	</head>
	<body>
		<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="home_page.php">点餐系统</a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">订单管理<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="order_list.php">订单列表</a></li>
            <li><a href="order_record.php">订单记录</a></li>
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">菜单管理<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="accession_v.php">添加菜品</a></li>
            <li><a href="v_list.php">菜品列表</a></li>
            <li role="separator" class="divider"></li>
			<li><a href="accession_v_type.php">添加菜品类型</a></li>
			<li><a href="v_type_list.php">菜品类型列表</a></li>
          </ul>
        </li>
		<li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">餐桌管理<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="accesion_table.php">添加餐桌</a></li>
            <li><a href="table_list.php">餐桌列表</a></li>
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">登录管理<span class="caret"></span></a>
          <ul class="dropdown-menu">
			<li><a href="#" data-toggle="modal" data-target="#a">关于点餐系统</a></li>
			<li role="separator" class="divider"></li>
            <li><a href="login_message.php">修改登录信息</a></li>
            <li><a href="#exitModal" data-toggle="modal">退出登录</a></li>
          </ul>
        </li>
      </ul>
	   <div class="modal fade" id="a" tabindex="-1" >
        	<div class="modal-dialog">
        		<div class="modal-content">
        			<div class="modal-header">
        				<button type="button" class="close" data-dismiss="modal">
        					<span>&times;</span><span class="sr-only">Close</span>
        				</button>
        				<div class="modal-title" style="font-size:x-large">关于点餐系统</div>
        			</div>
        			<div class="modal-body">
        			    纯属娱乐，请勿在意
        			</div>
        			<div class="modal-footer">
        				<button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
        			</div>
        		</div>
        	</div>
        </div>
        <div class="modal fade" id="exitModal" tabindex="-1" >
        	<div class="modal-dialog">
        		<div class="modal-content">
        			<div class="modal-header">
        				<button type="button" class="close" data-dismiss="modal">
        					<span>&times;</span><span class="sr-only">Close</span>
        				</button>
        				<div class="modal-title" style="font-size:x-large">确定退出登录</div>
        			</div>
        			<div class="modal-body">
        			     你确定要退出登录吗？
        			</div>
        			<div class="modal-footer">
        				<a type="button" class="btn btn-primary" href="login.php">确定</a>
        				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        			</div>
        		</div>
        	</div>
        </div>
    </div>
  </div>
</nav>
	<div class="container">
		<div class="row">
				<div class="col-xs-3">
					<div class="modal-dialog pull-left" style="width: 100%;margin-top: 0;">
					<div class="modal-content">
						<div class="modal-header">
							<div class="modal-title">
								<div class="input-group">
								<input type="text" class="form-control" placeholder="桌号" aria-describedby="basic-addon1">
								<span class="input-group-btn">
							<button class="btn btn-default" type="button">
							  <span class="glyphicon glyphicon-search"></span>&nbsp;
							</button>
								</span>
								</div>
							</div>
						</div>
						<div class="modal-body">
							
									<?php
									@session_start();
									$pdo=new PDO('mysql:dbname=BB;charset=utf8','root'); 
									$sel=$pdo->prepare('select * from canzhuo');
									$sel->execute(array());
									$b=$sel->fetchAll(PDO::FETCH_NAMED);
									foreach($b as $c){
								?>
								<a href="home_page.php?zid=<?php echo $c['id'] ?>" class="list-group-item"><?php echo $c['name'] ?></a>
								<?php } ?>
							
						</div>
					</div>
				</div>
				</div>
				<div class="col-xs-9">
					<div class="panel panel-default ">
							<div class="panel-heading" style="color:white;background-color:green">
							<span class="glyphicon glyphicon-ok">
							<?php
							$pdo=new PDO('mysql:dbname=BB;charset=utf8','root'); 
							$sel=$pdo->prepare('select * from canzhuo where id=:id');
							$sel->execute(array('id'=>$zid));
							$z=$sel->fetch(PDO::FETCH_NAMED);
							echo $z['name'];
						?>-已选</span></div>
								
								<div class="panel-body">
									
									
									
								</div>
						</div>
						<div class="panel panel-default">
							<div class="panel-heading" style="color:white;background-color:green">
								<div class="panel-title"><span class="glyphicon glyphicon-th-list"></span>可选商品
									<div class="input-group col-xs-5 pull-right">
									
										<input type="text" class="form-control" style="width: 120px;">
								
											<select class="form-control" style="width: 90px;">
												<option>全部</option>
												<option>凉菜</option>
												<option>烧菜</option>
												<option>炖菜</option>
												<option>炒菜</option>
											</select>
											&nbsp<button type="submit" class="btn btn-default" style="height:35px"><span class="glyphicon glyphicon-search">
											</span></button>
											
									</div>
								</div>
							</div>
						</div>
						
									<div class="panel-body">
									<?php
									$pdo=new PDO('mysql:dbname=BB;charset=utf8','root'); 
									$sel=$pdo->prepare('select * from price');
									$sel->execute(array());
									$q=$sel->fetchAll(PDO::FETCH_NAMED);
									foreach($q as $w){
								?>
								
									<div class="col-xs-6 col-md-3">
										<a href="#a" class="thumbnail">
											<img src="<?php echo $w['url'] ?>" id="a" alt="<?php echo $w['Cname'] ?>" style="width:200px;height:200px">
											<?php echo  $w['Cname'] ?>
											<?php echo $w['value'] ?>
											
										</a>
									</div>
									<?php } ?>
					</div>
					</div>
				</div>		
		</div>
</body></html>